package models

import "tuowei.com/common/models"

type SysLecturer struct {
	models.Model
	UserId                 int           `json:"user_id" gorm:"type:int(10);not null;comment:用户ID"`
	TeacherNumber          string        `json:"teacher_number" gorm:"varchar(20);comment:讲师编号"`
	Name                   string        `json:"name" gorm:"type:varchar(20);comment:教师姓名"`
	TelPhone               string        `json:"tel_phone" gorm:"type:varchar(20);comment:教师联系电话"`
	TeachingSubject        string        `json:"teaching_subject" gorm:"type:varchar(10);comment:任教科目"`
	TeachingType           string        `json:"teaching_type" gorm:"type:varchar(10);comment:任教类型"` //网课 线下授课
	Avatar                 string        `json:"avatar" gorm:"type:varchar(255);comment:头像"`
	IsTop                  int           `json:"is_top" gorm:"type:tinyint;comment:是否置顶"`
	GraduatedFrom          string        `json:"graduated_from" gorm:"type:varchar(255);comment:毕业院校"`
	TeachingExperience     string        `json:"teaching_experience" gorm:"type:text;comment:教学经历"`
	TeachingCharacteristic string        `json:"teaching_characteristic" gorm:"type:text;comment:教学特点"`
	Introduction           string        `json:"introduction" gorm:"type:varchar(255);comment:讲师简介"` //简介
	Label                  string        `json:"label" gorm:"type:varchar(255);comment:标签"`
	DeptId                 int           `json:"dept_id" gorm:"type:int(5);comment:所属部门ID"`
	Dept                   *LecturerDept `json:"dept" gorm:"foreignKey:dept_id;references:dept_id"`
	TeachingPointId        int           `json:"teaching_point_id" gorm:"type:int(10);comment:所属教学点id"`
	TeachingPoint          TeachingPoint `json:"teaching_point" gorm:"foreignKey:teaching_point_id;references:id"`
	models.ControlBy
	models.ModelTime
}

func (SysLecturer) TableName() string {
	return "sys_lecturer"
}

func (e *SysLecturer) Generate() models.ActiveRecord {
	o := *e
	return &o
}

func (e *SysLecturer) GetId() interface{} {
	return e.Id
}

type SysLecturerList struct {
	Id   int    `json:"id"`
	Name string `json:"name"`
}
